package com.qqtech.qquan.hi.service;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import com.qqtech.core.frame.dao.BaseDao;
import com.qqtech.core.frame.service.BaseServiceImpl;
import com.qqtech.qquan.hi.cache.HiSysParamCache;
import com.qqtech.qquan.hi.dao.HiSysParamDao;
import com.qqtech.qquan.hi.model.HiSysParam;

@Service
public class HiSysParamServiceImpl extends BaseServiceImpl<HiSysParam>
		implements HiSysParamService {
	public static final Logger log = LoggerFactory.getLogger(HiSysParamServiceImpl.class);
	
	@Resource
	private HiSysParamDao hiSysParamDao;
	@Resource
	private HiSysParamCache hiSysParamCache;
	
	@Override
	protected BaseDao<HiSysParam> getBaseDao() {
		return hiSysParamDao;
	}
	
	@Override
	public HiSysParam getByKey(java.lang.String key) {
		return hiSysParamDao.getByKey(key);
	}

	@Override
	public int handleUpdateParam(HiSysParam param) {
		int id = hiSysParamDao.updateById(param);
		hiSysParamCache.clearAll();
		return id;
	}	
}